home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 7732 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.3 KB

  1. Path: server-b.cs.interbusiness.it!usenet
  2. From: Ennio Porro <eporro.interform@planet.it>
  3. Newsgroups: comp.lang.c++
  4. Subject: Re: BC 4.5 Calling DLL from VB and returning DOUBLE
  5. Date: Sun, 18 Feb 1996 01:31:59 +0100
  6. Organization: Centro Servizi Interbusiness
  7. Message-ID: <3126737F.39AA@planet.it>
  8. References: <3125C5D3.38B2@ix.urz.uni-heidelberg.de>
  9. NNTP-Posting-Host: ppp7.planet.it
  10. Mime-Version: 1.0
  11. Content-Type: text/plain; charset=us-ascii
  12. Content-Transfer-Encoding: 7bit
  13. X-Mailer: Mozilla 2.0 (Win95; I)
  14.  
  15. Matthias Ernst wrote:
  16. > I called a DLL function (created with the BC 4.5 compiler) from VB (or
  17. > EXCEL, ACCESS) and tried to return a DOUBLE (by value).
  18. > It didn't work - but it works with the VISUAL C++ compiler ???
  19. > Is There a secret ???
  20.  
  21. I think the problem is you've missed the indication to the compiler to 
  22. export the function making it visible to other applications.
  23. You can do this in three ways:
  24.  
  25. a) You can use the "_export" in the declaration of the function you want 
  26. to call from other application;
  27. b) You can declare the function to export in the EXPORTS section of the 
  28. file .def
  29. c) You can compile your dll with the option -W (that will make all the 
  30. funcion in your code exportable.
  31.  
  32. I think one of this could be the solution to your problem.
  33. Mail me if it's not.
  34.  
  35. Regards.
  36.  
  37.  
  38. Ennio Porro
  39. eporro.interform@planet.it
  40.  
  41.  
  42.